package com.kunya.product.dao.comment;

import com.kunya.product.po.Comment;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CommentMapper {
    int deleteByPrimaryKey(@Param("commentId") Long commentId,@Param("table_prefix") String table_prefix);

    int insert(@Param("record") Comment record,@Param("table_prefix") String table_prefix);

    int insertSelective(@Param("record") Comment record,@Param("table_prefix") String table_prefix);

    Comment selectByPrimaryKey(@Param("commentId")  Long commentId,@Param("table_prefix") String table_prefix);

    int updateByPrimaryKeySelective(@Param("record")  Comment record,@Param("table_prefix") String table_prefix);

    int updateByPrimaryKey(@Param("record") Comment record,@Param("table_prefix") String table_prefix);

    List<Comment> getCommentsByProductId(@Param("productId") Long productId,@Param("table_prefix") String table_prefix);

   /**
    * @author zp
    * @Description: 批量插入评论
    * @param
    * @date 2018/7/16 17:30
    */
   int batchInsertComment(@Param("commentList") List<Comment> commentList,@Param("table_prefix") String table_prefix);
}